package com.jdrx.sw.sewage.common.enums;

import com.jdrx.sw.sewage.common.constant.Constant;

public enum EQualityAlarmPar {
    GZ("GZ", "故障"),
    COD("COD", "COD"),
    BOD5("BOD5", "BOD5"),
    SS("SS", "SS"),
    TP("TP", "TP"),
    TN("TN", "TN"),
    NH3N("NH3N", "NH3N"),
    PH("PH", "PH");

    private String key;
    private String value;

    EQualityAlarmPar(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getName(String key) {
        for (EQualityAlarmPar status : EQualityAlarmPar.values()) {
            if (key.equals(status.getKey())) {
                return status.getValue();
            }
        }
        return Constant.EMPTY;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
